Optimal. Leaf size=31 \[ \frac {\log (\sin (a+b x))}{b^2}-\frac {x \cot (a+b x)}{b}-\frac {x^2}{2} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.02, antiderivative size = 31, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 3, integrand size = 10, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.300, Rules used = {3720, 3475, 30} \[ \frac {\log (\sin (a+b x))}{b^2}-\frac {x \cot (a+b x)}{b}-\frac {x^2}{2} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 30
Rule 3475
Rule 3720
Rubi steps
\begin {align*} \int x \cot ^2(a+b x) \, dx &=-\frac {x \cot (a+b x)}{b}+\frac {\int \cot (a+b x) \, dx}{b}-\int x \, dx\\ &=-\frac {x^2}{2}-\frac {x \cot (a+b x)}{b}+\frac {\log (\sin (a+b x))}{b^2}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.22, size = 44, normalized size = 1.42 \[ \frac {\log (\sin (a+b x))}{b^2}-\frac {x \cot (a)}{b}+\frac {x \csc (a) \sin (b x) \csc (a+b x)}{b}-\frac {x^2}{2} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [B] time = 0.74, size = 75, normalized size = 2.42 \[ -\frac {b^{2} x^{2} \sin \left (2 \, b x + 2 \, a\right ) + 2 \, b x \cos \left (2 \, b x + 2 \, a\right ) + 2 \, b x - \log \left (-\frac {1}{2} \, \cos \left (2 \, b x + 2 \, a\right ) + \frac {1}{2}\right ) \sin \left (2 \, b x + 2 \, a\right )}{2 \, b^{2} \sin \left (2 \, b x + 2 \, a\right )} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [B] time = 4.74, size = 1250, normalized size = 40.32 \[ \text {result too large to display} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.72, size = 30, normalized size = 0.97 \[ -\frac {x^{2}}{2}-\frac {x \cot \left (b x +a \right )}{b}+\frac {\ln \left (\sin \left (b x +a \right )\right )}{b^{2}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [B] time = 0.47, size = 269, normalized size = 8.68 \[ \frac {2 \, {\left (b x + a + \frac {1}{\tan \left (b x + a\right )}\right )} a - \frac {{\left (b x + a\right )}^{2} \cos \left (2 \, b x + 2 \, a\right )^{2} + {\left (b x + a\right )}^{2} \sin \left (2 \, b x + 2 \, a\right )^{2} - 2 \, {\left (b x + a\right )}^{2} \cos \left (2 \, b x + 2 \, a\right ) + {\left (b x + a\right )}^{2} - {\left (\cos \left (2 \, b x + 2 \, a\right )^{2} + \sin \left (2 \, b x + 2 \, a\right )^{2} - 2 \, \cos \left (2 \, b x + 2 \, a\right ) + 1\right )} \log \left (\cos \left (b x + a\right )^{2} + \sin \left (b x + a\right )^{2} + 2 \, \cos \left (b x + a\right ) + 1\right ) - {\left (\cos \left (2 \, b x + 2 \, a\right )^{2} + \sin \left (2 \, b x + 2 \, a\right )^{2} - 2 \, \cos \left (2 \, b x + 2 \, a\right ) + 1\right )} \log \left (\cos \left (b x + a\right )^{2} + \sin \left (b x + a\right )^{2} - 2 \, \cos \left (b x + a\right ) + 1\right ) + 4 \, {\left (b x + a\right )} \sin \left (2 \, b x + 2 \, a\right )}{\cos \left (2 \, b x + 2 \, a\right )^{2} + \sin \left (2 \, b x + 2 \, a\right )^{2} - 2 \, \cos \left (2 \, b x + 2 \, a\right ) + 1}}{2 \, b^{2}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 0.45, size = 54, normalized size = 1.74 \[ \frac {\ln \left ({\mathrm {e}}^{a\,2{}\mathrm {i}}\,{\mathrm {e}}^{b\,x\,2{}\mathrm {i}}-1\right )}{b^2}-\frac {x\,2{}\mathrm {i}}{b}-\frac {x^2}{2}-\frac {x\,2{}\mathrm {i}}{b\,\left ({\mathrm {e}}^{a\,2{}\mathrm {i}+b\,x\,2{}\mathrm {i}}-1\right )} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 0.46, size = 68, normalized size = 2.19 \[ \begin {cases} \tilde {\infty } x^{2} & \text {for}\: \left (a = 0 \vee a = - b x\right ) \wedge \left (a = - b x \vee b = 0\right ) \\\frac {x^{2} \cot ^{2}{\relax (a )}}{2} & \text {for}\: b = 0 \\- \frac {x^{2}}{2} - \frac {x}{b \tan {\left (a + b x \right )}} - \frac {\log {\left (\tan ^{2}{\left (a + b x \right )} + 1 \right )}}{2 b^{2}} + \frac {\log {\left (\tan {\left (a + b x \right )} \right )}}{b^{2}} & \text {otherwise} \end {cases} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________